<style>
.fui-page,.fui-content{background:#fff}
.col-jy-2{
    padding-right: 0;
    padding-left: 0;
}
.fui-cell-group .fui-cell .fui-input {
    background: none;
}
.fui-cell-group .fui-cell .fui-cell-label {
    width: 3rem;
	font-size: 0.75rem;
}
.btn{
   line-height:3
}
.btn.btn-banf {
    border-radius: 1.5rem;
}
input[type=checkbox], input[type=radio] {
    min-width: 0.7rem;
    min-height: 0.7rem;
    line-height: 0.7rem;
}
</style>
<div ng-if="pagedata.op=='get'" class='fui-page fui-page-current'>
	<div ng-if="pagedata.op=='get'" class='fui-content'>
		<div style="padding:0 1rem">
		<div class="top" style="padding-top:2rem;padding-bottom:1rem">
			<div class="c">
				<img style="width:3.6rem;border-radius:0.5rem" src="{{tomedia(pagedata.account.logo) || '../core/resource/images/ng-logo.png'}}"  />
			</div>
			<div class="c gray" style="padding-top:0.2rem">{{pagedata.account.title}}</div>
		</div>
		<div class="fui-cell-group" ng-show="pagedata.item.show_type" style="margin-top:0;padding:0 0.6rem">
			<div class="fui-tab fui-tab-success" ng-show="pagedata.item.show_type">
					<a ng-class="{'active':pagedata.item.login_type!=1}" ng-click="pagedata.item.login_type=0">账号登陆</a>
					<a ng-class="{'active':pagedata.item.login_type==1}" ng-click="pagedata.item.login_type=1">手机登陆</a>
			</div>
		</div>
		<div class="fui-cell-group radius" ng-show="pagedata.item.login_type != 1">
			<div class="fui-cell">
				<div class="fui-cell-label">{{pagedata.name_title}}</div>
				<div class="fui-cell-info">
				<input type="text" class='fui-input' list="history" name="username" placeholder="请输入{{pagedata.name_title}}"  ng-model="pagedata.item.username" />
				<datalist id="history" style="max-height:5rem;overflow-y:scroll">
					<option ng-repeat="h in pagedata.Storageusernames track by $index" value="{{h.username}}">
				</datalist>
				</div>
			</div>
			<div class="fui-cell">
				<div class="fui-cell-label ">密 码</div>
				<div class="fui-cell-info"><input type="password" class='fui-input' placeholder="请输入密码" ng-model="pagedata.item.password" /></div>
			</div>
		</div>
		<div class="fui-cell-group radius" ng-show="pagedata.item.login_type==1">
			<div class="fui-cell">
				<div class="fui-cell-label">手机号</div>
				<div class="fui-cell-info"><input type="text" class='fui-input' placeholder="请输入手机号"  ng-model="pagedata.item.mobile" /></div>
				<div class="fui-cell-remark noremark"><a class="btn btn-default btn-default-o btn-sm" ng-click="tool.mobile_code(pagedata.item.mobile,'smscode')" id="smscode">获取验证码</a></div>
			</div>
			<div class="fui-cell">
				<div class="fui-cell-label ">验证码</div>
				<div class="fui-cell-info"><input type="text" class='fui-input' placeholder="请输入验证码" ng-model="pagedata.item.smscode" /></div>
			</div>
		</div>
		<div class="fui-cell-group">
                <div class="fui-cell small">
                    <div class="fui-cell-text">
                        <label class="checkbox-inline" style="font-size:0.7rem;padding-bottom:0">
                            <input type="checkbox" class="fui-checkbox-primary" ng-click="pagedata.item.check=1" id="agree" ng-checked="pagedata.item.check==1"/> 我已经阅读并同意了<a ng-click="pagedata.show_xieyi=true" id="btn-apply" style="color:#337ab7;">用户协议，隐私政策</a>。
                        </label>
                    </div>
                </div>
        </div>
		<a href='javascript:;' ng-click="post(pagedata.item,'login');pagedata.localStorageusername();" class='btn btn-banf btn-success block' style="margin-top:0">登录</a>
		<div class="fui-cellone" style="padding-top:0">
				<div ng-if="pagedata.item.no_openidlogin!=1 && pagedata.item.openid && !pagedata.openlogin" class="fui-cellone-info c" style="padding-right:20px">
					<img src="../core/resource/images/icon/wechat.png" style="width:0.65rem;height:0.65rem"/>
					<a class="syscolor" style="font-size:0.65rem;line-height:1rem" href="javascript:;" ng-click="post(pagedata.item,'wechat_login')">微信一键登录</a>
				</div>
				<div ng-if="pagedata.openlogin" class="fui-cellone-info c" style="padding-right:20px">
					<img src="../core/resource/images/icon/wechat.png" style="width:0.65rem;height:0.65rem"/>
					<a class="syscolor" style="font-size:0.65rem;" href="javascript:;" ng-click="post(pagedata.item,'core/member.login/wxapp_login/')">{{pagedata.opentitle}}一键登录</a>
				</div>
		</div>
		<div class="fui-cellone" style="padding-top:0">			
				<div class="fui-cellone-text">
				<span style="font-size:0.65rem"> 还没有{{pagedata.name}}账号？<a class="syscolor" href="javascript:;" ng-click="access_json(links('/member.register/'))">去注册</a></span>
				</div>
				<div class="fui-cellone-remark noremark">
				<span style="font-size:0.65rem"><a class="syscolor" href="javascript:;" ng-click="access_json(links('/member.change/'))">忘记密码？</a></span>
				</div>
		</div>
		</div>
		<div ng-include="sys_html('common/_copyright',true)"></div>
	</div>
	<div ng-if="pagedata.op=='sq_login'" class='fui-content' style="margin-top:2.7rem">
		<a href='javascript:;' ng-click="post(pagedata.item,'sq_login')" class='btn btn-success block'>确认登陆</a>
	</div>
</div>
<div ng-if="pagedata.op=='wxauth_check'" class="fui-page" style="height:auto;background:url('../core/resource/images/login-bg-sm.jpg') no-repeat 100%;background-size: 100%;">
	<div class="fui-content" style="background:none;padding:0.5rem">
		<div class="weui_cells_title" style="font-size:0.9rem;margin-top:2rem;color:#333"><img style="width:1.2rem;height:1.2rem;border-radius:50%" ng-src="{{tomedia(main.logo) || '../core/resource/images/nopic.jpg'}}"> {{pagedata.account.title}} 申请获取</div>
		<div class="weui_cells_title bold" style="font-size:1rem;margin-top:0.2rem;color:#000">以下信息</div>
		<div class="weui_cells" style="padding-left:10px">
            <div class="weui_cell">
                <div class="weui_cell_bd weui_cell_primary" style="padding-left:0.2rem">
                    <span>你的账号信息（昵称、头像、地区及性别）</span>
                </div>
            </div>
        </div>
		<div class="weui_cells weui_cells_checkbox" style="padding-left:10px;margin-top:0">
            <label class="weui_cell weui_check_label" for="s11">
                <div class="weui_cell_hd" style="padding-right:0;padding-left:0.2rem;">
                    <img ng-src="{{tomedia(pagedata.fans.avatar) || '../core/resource/images/nopic.jpg'}}" style="width:3rem;height:3rem;border-radius:0.3rem;margin-right:5px;display:block">
                </div>
                <div class="weui_cell_bd weui_cell_primary" style="padding-left:0.2rem">
                    <div style="color:#333;font-size:1rem;padding-bottom:0.3rem">{{pagedata.fans.nickname}}</div>
					<div class="subtitle">微信个人信息</div>
                </div>
				<div class="weui_cell_ft">
                    <input type="radio" class="weui_check" name="checkbox1" id="s11" checked="checked">
                    <span class="weui_icon_checked"></span>
                </div>
            </label>
        </div>
		<button class="weui_btn weui_btn_primary" style="margin: auto;margin-top:8rem;width:60%;" ng-click="access_json('core/member.login/sq_login/session_id='+pagedata.session_id+'&forward_url='+pagedata.forward_url)">授权登录</button>
		<button class="weui_btn weui_btn_disabled weui_btn_default" style="margin: auto;margin-top:0.4rem;width:60%;" ng-click="access_json('core/member.login/sq_login/session_id='+pagedata.session_id+'&forward_url='+pagedata.forward_url)">取消</button>
		<div class="footer-support">
			<div ng-if="main.js_supportimg" class="supportimg"><img ng-src="{{tomedia(main.js_supportimg) || '../core/resource/images/js_supportimg.png'}}"/></div>
			<div class="supporttitle">{{main.js_support}}提供技术支持</div>
		</div>
	</div>
</div>
<div ng-if="pagedata.show_xieyi" class="popup">
	<div class="popup-body">
		<div class="popup-center">
			<i class="closed icon icon-cuowu" ng-click="pagedata.show_xieyi=false"></i>
			<div class="content-images" style="padding:0.5rem;height:20rem; overflow-y:scroll;">
					<div class="title bold" style="font-size:0.8rem">用户协议，隐私政策 / <small>Read Ggree</small></div>
					<div class="text" style="padding-top:0.5rem;font-size:0.7rem" ng-bind-html="trust(pagedata.setting.user_xieyi)"></div>
			</div>
			<div class="modal-footer">
				<div ng-click="pagedata.show_xieyi=false;pagedata.item.check=1;" class="mod-check" style="width: 100%; margin: 0;">我已阅读</div>
			</div>
		</div>
	</div>
</div>
<div ng-include="sys_html('common/_footer')"></div>
<script>
if(scope.pagedata.item){
	scope.pagedata.item.needcheck=1;
}
scope.pagedata.ischecklogin='';
scope.pagedata.Storageusernames=localStorage.getItem('usernames');
if(scope.pagedata.Storageusernames){
	//console.log(scope.pagedata.Storageusernames)
	scope.pagedata.Storageusernames=JSON.parse(scope.pagedata.Storageusernames)
}else{
	scope.pagedata.Storageusernames=[]
}
scope.pagedata.localStorageusername=function(){
		for(var i=0;i<scope.pagedata.Storageusernames.length;i++){
			if(scope.pagedata.Storageusernames[i].username==scope.pagedata.item.username){
				return '';
			}
		}
		var item={
			'username':scope.pagedata.item.username,
			'password':scope.pagedata.item.password
		}
		scope.pagedata.Storageusernames.push(item);
		localStorage.setItem('usernames',JSON.stringify(scope.pagedata.Storageusernames));
}
</script>